package com.itheima.service.mongo.impl;

import com.itheima.domain.mongo.UserLocation;
import com.itheima.service.mongo.MapNeedMessageService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

import java.util.List;

@Service
public class MapNeedMessageServiceImpl implements MapNeedMessageService {

    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public List<UserLocation> findLocationMessage() {
        List<UserLocation> allUserLocation = mongoTemplate.findAll(UserLocation.class);
        return allUserLocation;
    }
}
